package com.r2coding.server.modules.file.po;

import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.springframework.web.multipart.MultipartFile;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @author 98k灬
 * @version v1.0.0
 * @Description : 功能描述
 * @Create on : 2023/10/13 13:11
 **/
@Data
public class FileUploadPo implements Serializable {

    private static final long serialVersionUID = -5732228116891635174L;

    @NotBlank(message = "父ID不能为空")
    private String parentId;

    @Length(max = 20, message = "文件名称不能超过20个字符")
    @NotBlank(message = "文件名称不能为空")
    private String filename;

    @NotBlank(message = "文件唯一标识不能为空")
    private String identifier;

    @NotNull(message = "文件总大小不能为空")
    private Long totalSize;

    @NotNull(message = "文件实体不能为空")
    private MultipartFile file;
}
